<div class="text-center py-10">
  <h1 class="title-decorator inline-block text-left">
    <%= t("decidim.verifications.id_documents.authorizations.new.title") %>
  </h1>
</div>

<div class="my-12">
  <%= cell("decidim/announcement", announcement_title(authorization), callout_class: authorization.rejected? ? "alert" : "secondary" ) %>
</div>

<% unless using_online? %>
<div class="mb-12">
  <%= translated_attribute(current_organization.id_documents_explanation_text).html_safe %>
</div>
<% end %>

<%= decidim_form_for(@form, url: authorization_path, method: :put) do |form| %>
    <%= render partial: "form", locals: { form: } %>

  <div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
    <%= link_to authorizations_back_path(current_user, redirect_url:), class: "button button__sm md:button__lg button__text-secondary" do %>
      <%= icon "arrow-left-line", class: "fill-current" %>
      <span><%= t("decidim.wizard_step_form.wizard_aside.back") %></span>
    <% end %>
    <button type="submit" class="button button__sm md:button__lg button__secondary">
      <span><%= t("decidim.verifications.id_documents.authorizations.edit.send") %></span>
      <%= icon "arrow-right-line", class: "fill-current" %>
    </button>
  </div>

  <% if available_methods.count > 1 %>
    <%= link_to t("decidim.verifications.id_documents.authorizations.edit.offline"), { action: :edit, using: :offline }, class: "text-secondary" if using_online? %>
    <%= link_to t("decidim.verifications.id_documents.authorizations.edit.online"), { action: :edit, using: :online }, class: "text-secondary" if using_offline? %>
  <% end %>
<% end %>
